Platform Explorer / Nuxeo Platform 5.8

Contribution org.nuxeo.ecm.social.user.activity.stream.gadgets--gadget

This contribution is part of XML component org.nuxeo.ecm.social.user.activity.stream.gadgets inside nuxeo-user-activity-stream-5.8.jar

Extension Point

Extension point gadget of component service.

Contributed Items

  • <internalGadget disabled="false" name="useractivitystream">
          <documentation>
            This gadget displays the activities of a user, or the activities
            of the user's network.
    
            The following user preferences can be used to configure it:
            - activityLinkBuilder: activity link builder name to use to generate
              documents and user URLs
            - activityStreamType: can be 'forActor' to display the activities of
              the user's network, or 'fromActor' to display only the user activities.
            - actor: the actor for which to display the activities,
              default is the current user username.
    
            How to include the useractivitystream gadget in a JSF context:
            <code>
              <div class="gadget-useractivitystream threeQuarterWidth"/>
              <script type="text/javascript">
                jQuery('.gadget-useractivitystream').openSocialGadget({
                  baseURL: '#{baseURL}',
                  language: '#{localeSelector.language}',
                  gadgetDefs: [
                    { specUrl: '#{gadgetsBaseURL}/site/gadgets/useractivitystream/useractivitystream.xml',
                      title: '',
                      userPrefs: {
                        activityLinkBuilder: {
                          value: 'default'
                        },
                        activityStreamType: {
                          value: 'forActor'
                        }
                      },
                      displayTitleBar: false,
                      width: '100%'
                    }
                  ]
                });
              </script>
            </code>
    
            How to include the useractivitystream gadget in a WebEngine page:
            <code>
              <link href="${contextPath}/css/opensocial/light-container-gadgets.css" rel="stylesheet"/>
              <script src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1" type="text/javascript"/>
              <script src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js" type="text/javascript"/>
    
              <div class="gadget-useractivitystream gadgets-gadget-chrome"/>
              <script type="text/javascript">
                $('.gadget-useractivitystream').openSocialGadget({
                  baseURL: '${contextPath}' + '/',
                  language: '${Context.locale.language}',
                  gadgetDefs: [{
                    specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/useractivitystream/useractivitystream.xml',
                    userPrefs: {
                      activityLinkBuilder: {
                        value: 'default'
                      },
                      activityStreamType: {
                        value: 'forActor'
                      }
                    },
                    displayTitleBar: false,
                    width: '100%'
                  }]
                });
              </script>
            </code>
          </documentation>
    
          <mountPoint>/useractivitystream</mountPoint>
          <entryPoint>useractivitystream.xml</entryPoint>
          <category>Nuxeo</category>
          <icon>gadget-useractivitystream.png</icon>
        </internalGadget>

    This gadget displays the activities of a user, or the activities of the user's network. The following user preferences can be used to configure it: - activityLinkBuilder: activity link builder name to use to generate documents and user URLs - activityStreamType: can be 'forActor' to display the activities of the user's network, or 'fromActor' to display only the user activities. - actor: the actor for which to display the activities, default is the current user username. How to include the useractivitystream gadget in a JSF context: How to include the useractivitystream gadget in a WebEngine page:

XML Source

<extension point="gadget" target="org.nuxeo.opensocial.gadgets.service">

    <internalGadget disabled="false" name="useractivitystream">
      <documentation>
        This gadget displays the activities of a user, or the activities
        of the user's network.

        The following user preferences can be used to configure it:
        - activityLinkBuilder: activity link builder name to use to generate
          documents and user URLs
        - activityStreamType: can be 'forActor' to display the activities of
          the user's network, or 'fromActor' to display only the user activities.
        - actor: the actor for which to display the activities,
          default is the current user username.

        How to include the useractivitystream gadget in a JSF context:
        <code>
          <div class="gadget-useractivitystream threeQuarterWidth"/>
          <script type="text/javascript">
            jQuery('.gadget-useractivitystream').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/useractivitystream/useractivitystream.xml',
                  title: '',
                  userPrefs: {
                    activityLinkBuilder: {
                      value: 'default'
                    },
                    activityStreamType: {
                      value: 'forActor'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the useractivitystream gadget in a WebEngine page:
        <code>
          <link href="${contextPath}/css/opensocial/light-container-gadgets.css" rel="stylesheet"/>
          <script src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1" type="text/javascript"/>
          <script src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js" type="text/javascript"/>

          <div class="gadget-useractivitystream gadgets-gadget-chrome"/>
          <script type="text/javascript">
            $('.gadget-useractivitystream').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/useractivitystream/useractivitystream.xml',
                userPrefs: {
                  activityLinkBuilder: {
                    value: 'default'
                  },
                  activityStreamType: {
                    value: 'forActor'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>

      <mountPoint>/useractivitystream</mountPoint>
      <entryPoint>useractivitystream.xml</entryPoint>
      <category>Nuxeo</category>
      <icon>gadget-useractivitystream.png</icon>
    </internalGadget>

  </extension>